package cn.wanda.bi.sunshine.platform.server.utils;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import cn.wanda.bi.sunshine.platform.server.controller.response.common.SimpleResponse;
import cn.wanda.bi.sunshine.platform.server.utils.exception.ClientException;

/**
 * created by wangfupeng1
 */
public class ResponseUtil {
	
	public static SimpleResponse validateResponse(String responseString){
		SimpleResponse response = JsonUtil.toObject(responseString, SimpleResponse.class);
        if (response.getStatus() != 200 )
            throw new ClientException(response.getStatus(), response.getMessage());
        return response;
	}
	
}
